// login verification
import java.io.*;
public class HW5_3SP2 {

	
		   public static void main(String args[]) throws IOException
		   {
		      BufferedReader buf;
		      String str, password="123456";
		      
		      buf=new BufferedReader(new InputStreamReader(System.in));
		            
		      inputPassword(buf,password);      
		   }     
		   
		   private static void inputPassword(BufferedReader buf,String password) throws IOException
		   {
		      String str;
		      int count=0;
		      
		      while(true)
		      {
		         count++;
		         if(count>3){
		            System.out.println("Wrong password excess 3 times.");
		            break;
		         }            
		            
		         System.out.println("Please input the password");
		         str=buf.readLine();
		         
		         if(ifInteger(str))
		            if(str.equals(password)){            
		               System.out.println("Corrected!! Wellcome to our system!");              
		               break;
		            }
		      }
		   }
		   
		   private static boolean ifInteger(String str)
		   {
		      char[] charStr;
		      charStr=str.toCharArray();
		      
		      for(int i=0;i<str.length();i++)
		         if(charStr[i]<'0'||charStr[i]>'9')
		            return false;   
		   
		      return true;            
		   }
		}
